<php>
    $navMenuModel = new \app\admin\model\NavMenuModel();
    $main_nav     = $navMenuModel->navMenusTreeArray(0,2);  /*主菜单*/
    
    $logo_slide_id = empty($theme_vars['logo_slide']) ? 0 : $theme_vars['logo_slide'];
    if( !empty($logo_slide_id) ){

        $logo_slides = \app\admin\service\ApiService::slides($logo_slide_id, 1);  /*获取1张网站顶部logo*/
        if( $logo_slides ){
            $logo = $logo_slides[0];
        }
    }


 </php>

 <div class="header">
    <div class="headBox layout clearfix">
        <a href="<notempty name='logo.slide_url'>{$logo.slide_url}<else />__ROOT__/</notempty>" class="logo fl">
            <img src="{:cmf_get_image_url($logo['image'])}">
        </a>
        <div class="search iconfont fr">&#xe631;</div>
        <ul class="nav fr">
            <volist name="main_nav" id="vo">
                
                <li <if condition="$vo['name'] eq $parent_name">class="on"</if>>
                    <a href="{$vo.href}" target="{$vo.target}">
                        <span>{$vo.name}</span>
                    </a>
                    <if condition="!empty($vo['children'])">
                    <dl>
                        <volist name="vo.children" id="vo2">
                            <dd>
                                <a href="{$vo2.href}" target="{$vo2.target}">{$vo2.name}</a>
                            </dd>
                        </volist>
                        
                    </dl>
                    </if>
                </li>

            </volist>

            
            
        </ul>
        <div class="ser_form">
            <form class="search_form" method="post" action="{:cmf_url('portal/Search/index')}">
                <input type="text" name="keyword" placeholder="搜索关键词">
                <input type="submit" name="submit" value="&#xe6e3;" class="submit iconfont">
            </form>
        </div>
    </div>
</div>


